package com.project.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 购物车产品SKU
 * 加入购物车时备份SKU信息，方便回显，因为如果用户将该SKU加入购物车后，
 * 后
 * @author 
 */
@Data
@TableName(value = "cms_shopping_cart_product_sku")
@Table(name = "cms_shopping_cart_product_sku", comment = "购物车商品SKU")
public class CmsShoppingCartProductSku implements Serializable {
    /**
     * 购物车商品SKUID
     */
    @TableId
    @Column(type= MySqlTypeConstant.BIGINT, comment = "购物车商品SKUID", length = 11, isKey = true, isAutoIncrement = true,isNull = false)
    private Long cartSkuId;

    /**
     * 购物车ID
     */
    @Column(comment = "购物车ID")
    private Long cartId;

    /**
     * 商品SKUID
     */
    @Column(comment = "商品SKUID")
    private Long skuId;

    /**
     * 产品ID
     */
    @Column(comment = "产品ID")
    private Long productId;

    /**
     * 规格信息（逗号分隔）
     */
    @Column(comment = "规格信息（逗号分隔）", length = 2000)
    private String specData;

    /**
     * 库存
     */
    @Column(comment = "库存", defaultValue = "0")
    private Integer stock;

    /**
     * 售价
     */
    @Column(comment = "售价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal price;

    /**
     * 原价
     */
    @Column(comment = "原价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal originalPrice;

    /**
     * 供货价
     */
    @Column(comment = "供货价", defaultValue = "0.00", type = MySqlTypeConstant.DECIMAL, length = 18, decimalLength = 2)
    private BigDecimal favorablePrice;

    /**
     * SKU产品图片
     */
    @Column(comment = "SKU产品图片")
    private String skuImg;

    private static final long serialVersionUID = 1L;

}